package com.dyna.foundation.domain.resp;

import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

@ApiModel(value ="菜单视图对象")
@Data
public class SysMenuResp {

    @ApiModelProperty(value = "菜单ID")
    private Long id;

    @ApiModelProperty(value = "父菜单ID")
    private Long parentId;

    @ApiModelProperty(value = "菜单名称")
    private String name;

    @ApiModelProperty(value = "权限标识,仅菜单类型为按钮时，才需要传递", example = "sys:menu:add")
    private String permission;

    @ApiModelProperty(value="菜单类型")
    private Integer type;

    @ApiModelProperty(value = "路由路径")
    private String path;

    @ApiModelProperty(value = "组件路径")
    private String component;

    @ApiModelProperty(value = "菜单排序(数字越小排名越靠前)")
    private Integer sort;

    @ApiModelProperty(value = "ICON")
    private String icon;

    @ApiModelProperty(value = "菜单是否可见(1:显示;0:隐藏)", example = "false")
    private Boolean visible;

    @ApiModelProperty(value = "是否缓存", example = "false")
    private Boolean keepAlive;

    @ApiModelProperty(value = "是否总是显示", example = "false")
    private Boolean alwaysShow;

    @ApiModelProperty(value = "创建时间", required = true, example = "时间戳格式")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "子菜单")
    @JsonInclude(value = JsonInclude.Include.NON_NULL)
    private List<SysMenuResp> children;

}